/**
 * 
 */
package com.humi.partner.front.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.humi.cloud.common.model.Result;
import com.humi.cloud.security.support.annotation.LoginAccess;
import com.humi.partner.front.model.PartnerBasePO;
import com.humi.partner.front.service.FrontPartnerBaseService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 
 * <pre>
 * <b>Description:</b> 
 * <b>Author:</b> TianJunmin
 * <b>Date:</b> 2019年10月11日
 * </pre>
 */
@LoginAccess
@RestController
@RequestMapping("/front/partner_base")
@Api(tags = "前台-合作伙伴", protocols = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FrontPartnerBaseController {

	@Autowired
	FrontPartnerBaseService service;
	
	@PostMapping(value = "/applyPartner")
	@ApiOperation(value = "申请加入合作伙伴和修改申请信息", response = Result.class)
	public Result applyPartner(@RequestBody PartnerBasePO po) {
		return service.applyPartner(po);
	}

	@PostMapping(value = "/getApplyPartnerInfo")
	@ApiOperation(value = "获取基本信息", response = PartnerBasePO.class)
	public Result getApplyPartnerInfo() {
		return service.getApplyPartner();
	}
}
